Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR supports the migration from drupal/smtp to symfony_mailer_lite by reintroducing a “force From address” behavior at the Drupal mail API layer to satisfy Office 365 sender authorization requirements.
Changes:
- Adds
oit_mail_alter()to force theFromaddress tooitsrvcom@colorado.eduon all outgoing mail. - Adds default
Reply-To: oithelp@colorado.eduwhen not explicitly set by another module.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+638
to
+640
| $from = 'Office of Information Technology <oitsrvcom@colorado.edu>'; | ||
| $message['from'] = 'oitsrvcom@colorado.edu'; | ||
| $message['headers']['From'] = $from; |
Comment on lines
+641
to
+642
| $message['headers']['Sender'] = 'oitsrvcom@colorado.edu'; | ||
| $message['headers']['Return-Path'] = 'oitsrvcom@colorado.edu'; |
Comment on lines
+637
to
+645
| function oit_mail_alter(&$message) { | ||
| $from = 'Office of Information Technology <oitsrvcom@colorado.edu>'; | ||
| $message['from'] = 'oitsrvcom@colorado.edu'; | ||
| $message['headers']['From'] = $from; | ||
| $message['headers']['Sender'] = 'oitsrvcom@colorado.edu'; | ||
| $message['headers']['Return-Path'] = 'oitsrvcom@colorado.edu'; | ||
| if (empty($message['headers']['Reply-To'])) { | ||
| $message['headers']['Reply-To'] = 'oithelp@colorado.edu'; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe context / purpose for this PR
Move from smtp to symfony_mailer_lite
Issue link
https://github.com/UCBoulder/oit_dingo/issues/1343
Any other related PRs?
Link to MultiDev instance
http://md-1343-ucbsub-oit.pantheonsite.io
Checklist for PR author